<template>
    <div class="box">
        <div class="top">
            <div class="left">
                <p>{{ title }}</p>
                <p>{{ num }}</p>
            </div>
            <div class="right">
                <slot></slot>
            </div>
        </div>
        <div class="bottom">
            <p>
                <span><el-icon>
                        <TopRight />
                    </el-icon>
                </span>
                <span>3.48%</span> {{ text }}
            </p>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue'

defineProps({
    title: {
        type: String,
        default: '今日兑换量'
    },
    num: {
        type: String,
        default: '120'
    },
    text: {
        type: String,
        default: '自昨日以来'
    },

})


</script>

<style lang="less" scoped>
.box {
    width: 345px;
    border-radius: 8px;
    background-color: white;
    display: flex;
    flex-direction: column;
    margin: 20px 20px;
    font-size: 12px;
    color: #ccc;
    box-shadow: 5px 5px 5px #ccc;




    .top {
        display: flex;
        justify-content: space-around;
        padding: 20px 10px 0px 10px;
    }
}

.top .left p:nth-child(1) {
    font-size: 12px;

}

.top .left p:nth-child(2) {
    font-size: 24px;
    color: black;
}

.bottom {
    margin-top: 10px
}

.bottom p {
    margin-left: 40px;
    margin-bottom: 10px;

}

.bottom p span {
    color: #2dce89
}

.bottom p span:nth-child(2) {
    margin-right: 15px;
}
</style>